﻿using System.Collections.ObjectModel;

namespace RHLogReader.Model
{
    public class MessageBox
    {
        private ObservableCollection<Message> _Messages;
        public ObservableCollection<Message> Messages
        {
            get { return _Messages; }
            set { _Messages = value; }
        }

        private ObservableCollection<Character> _Characters;
        public ObservableCollection<Character> Characters
        {
            get { return _Characters; }
            set { _Characters = value; }
        }

        private ObservableCollection<Channel> _Channels;
        public ObservableCollection<Channel> Channels
        {
            get { return _Channels; }
            set { _Channels = value; }
        }

        private ObservableCollection<Group> _Groups;
        public ObservableCollection<Group> Groups
        {
            get { return _Groups; }
            set { _Groups = value; }
        }

        private ObservableCollection<Message> _SelectedMessages;
        public ObservableCollection<Message> SelectedMessages
        {
            get { return _SelectedMessages; }
            set { _SelectedMessages = value; }
        }

        private ObservableCollection<Character> _SelectedCharacters;
        public ObservableCollection<Character> SelectedCharacters
        {
            get { return _SelectedCharacters; }
            set { _SelectedCharacters = value; }
        }

        private ObservableCollection<Channel> _SelectedChannels;
        public ObservableCollection<Channel> SelectedChannels
        {
            get { return _SelectedChannels; }
            set { _SelectedChannels = value; }
        }

        private ObservableCollection<Group> _SelectedGroups;
        public ObservableCollection<Group> SelectedGroups
        {
            get { return _SelectedGroups; }
            set { _SelectedGroups = value; }
        }

        public MessageBox()
        {
            SelectedMessages = new ObservableCollection<Message>();
            SelectedGroups = new ObservableCollection<Group>();
            SelectedCharacters = new ObservableCollection<Character>();
            SelectedChannels = new ObservableCollection<Channel>();
        }

        public override string ToString()
        {
            string ret = "";

            //if(SelectedMessages == null || SelectedMessages.Count == 0)
            //{
            foreach (var item in Messages)
            {
                ret += item;
            }
            //}

            return ret;
        }
    }
}
